# $Id$
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: SleepyDog

pkgname=glew
pkgver=2.1.0
pkgrel=1
pkgdesc="The OpenGL Extension Wrangler Library"
arch=('i686' 'x86_64')
url="http://glew.sourceforge.net"
license=('BSD' 'MIT' 'GPL')
depends=('libxmu' 'libxi' 'glu')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz)
sha1sums=('18eca05460d0b61709fc115e632b6fe320718b44')

build() {
  cd ${pkgname}-${pkgver}
  
  sed -i 's|lib64|lib|' config/Makefile.linux
  sed -i '/^.PHONY: .*\.pc$/d' Makefile
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make GLEW_DEST="${pkgdir}/usr" install.all
  install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

#  chmod 0755 "${pkgdir}"/usr/lib/libGLEW*.so.${pkgver}
}
